Trirangkap heks Warna sesawang

Satu trirangkap heks adalah satu nombor enam digit, tiga-bait perenambelas digunakan di dalam HTML, CSS, SVG, dan aplikasi-aplikasi perkomputeran yang lain , untuk mewakilkan warna-warna. Bait-bait mewakilkan komponen-komponen warna merah, hijau dan biru. Satu bait mewakilkan satu nombor di dalam julat 00 ke FF (dalam notasi perenambelas), atau 0 ke 255 dalam notasi perenambelas. Ini mewakilkan sekurang-kurangnya keamatan (0) hingga ke paling banyak (255) bagi setiap komponen warna. Trirangkap heks dibentuk oleh rangkaian tiga bait di dalam notasi perenambelas, di dalam aturan yang berikut:

Bait 1: nilai merah (jenis warna merah)Bait 2: nilai hijau (jenis warna hijau)Bait 3: nilai biru (jenis warna biru)

Sebagai contoh, pertimbangkan warna dimana nilai-nilai merah/hijau/biru adalah nombor-nombor perpuluhan: merah=36, hijau=104, biru=160 (satu warna hijau kekelabuan). Nombor-nombor perpuluhan adalah 36, 104 dan 160 adalah setara dengan nombor-nombor perenambelas 24, 68 dan A0 masing-masing. Trirangkap heks ini diperolehi dengan merangkaikan digit-digit 6 perenambelas sekaligus, 2468A0 sebagai contoh.

Tolong bantu menterjemahkan sebahagian rencana ini.
Rencana ini memerlukan kemaskini dalam Bahasa Melayu piawai Dewan Bahasa dan Pustaka. Sila membantu, bahan-bahan boleh didapati di Web colors (Inggeris).
Jika anda ingin menilai rencana ini, anda mungkin mahu menyemak di terjemahan Google. Walau bagaimanapun, jangan menambah terjemahan automatik kepada rencana, kerana ini biasanya mempunyai kualiti yang sangat teruk.
Sumber-sumber bantuan: Pusat Rujukan Persuratan Melayu.

Note that if any one of the three color values is less than 16 (decimal) or 10 (hex), it must be represented with a leading zero so that the triplet always has exactly six digits. For example, the decimal triplet 4, 8, 16 would be represented by the hex digits 04, 08, 10, forming the hex triplet 040810.

The number of colors that can be represented by this system is

256 × 256 × 256 = 16 , 777 , 216 {\displaystyle 256\times 256\times 256=16,777,216}

An abbreviated, three (hexadecimal) digit form is sometimes used.[5] Expanding this form to the six-digit form is as simple as doubling each digit: 09C becomes 0099CC. This allows each color value to cover its full range from 00 to FF.

The three-digit form is described in the CSS specification, not in HTML. As a result, the three digit form in an attribute other than "style" is not interpreted as a valid color in some browsers. [perlu rujukan]

Jadual warna

Di dalam jadual di bawah, setiap kod warna yang disenaraikan adalah satutrengkas bagi nilai RGB; sebagai contoh, kod 609 adalah setara dengan kod RGB 102-0-153 atau kod HEX #660099.


Web-Safe Colors
*000*300600900C00*F00*
*003*303603903C03*F03*
006306606906C06F06
009309609909C09F09
00C30C60C90CC0CF0C
*00F*30F60F90FC0F*F0F*
030330630930C30F30
033333633933C33F33
036336636936C36F36
039339639939C39F39
03C33C63C93CC3CF3C
03F33F63F93FC3FF3F
060360660960C60F60
063363663963C63F63
066366666966C66F66
069369669969C69F69
06C36C66C96CC6CF6C
06F36F66F96FC6FF6F
090390690990C90F90
093393693993C93F93
096396696996C96F96
099399699999C99F99
09C39C69C99CC9CF9C
09F39F69F99FC9FF9F
0C03C06C09C0CC0FC0
0C33C36C39C3CC3FC3
0C63C66C69C6CC6FC6
0C93C96C99C9CC9FC9
0CC3CC6CC9CCCCCFCC
0CF3CF6CF9CFCCFFCF
*0F0*3F0*6F0*9F0CF0*FF0*
0F3*3F3**6F3*9F3CF3*FF3*
*0F6**3F6*6F69F6*CF6**FF6*
0F93F96F99F9CF9FF9
*0FC**3FC*6FC9FCCFCFFC
*0FF**3FF**6FF*9FFCFF*FFF*

Warna-warna sesawang paling selamat

Designers were often encouraged to stick to these 216 "web-safe" colors in their websites; however, 8-bit color displays were much more common when the 216-color palette was developed than they are now. David Lehn and Hadley Stern have since discovered that only 22 of the 216 colors in the web-safe palette are reliably displayed without inconsistent remapping on 16-bit computer displays. They called these 22 colors the "really safe" palette; it consists mainly of shades of green and yellow, as can be seen in the table above, where the "really safe" colors are underlined.[6]